package com.gmd.model;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the recetamedica_medicamento database table.
 * 
 */
@Entity
@Table(name="recetamedica_medicamento")
public class RecetamedicaMedicamento implements Serializable {
	private static final long serialVersionUID = 1L;
	private RecetamedicaMedicamentoPK id;
	private int duracion;
	private int intervalo;
	private int untomar;
	private String viaadmin;
	private Recetamedica recetamedica;
	private Medicamento medicamento;

	public RecetamedicaMedicamento() {
	}


	@EmbeddedId
	public RecetamedicaMedicamentoPK getId() {
		return this.id;
	}

	public void setId(RecetamedicaMedicamentoPK id) {
		this.id = id;
	}


	public int getDuracion() {
		return this.duracion;
	}

	public void setDuracion(int duracion) {
		this.duracion = duracion;
	}


	public int getIntervalo() {
		return this.intervalo;
	}

	public void setIntervalo(int intervalo) {
		this.intervalo = intervalo;
	}


	public int getUntomar() {
		return this.untomar;
	}

	public void setUntomar(int untomar) {
		this.untomar = untomar;
	}


	@Column(length=20)
	public String getViaadmin() {
		return this.viaadmin;
	}

	public void setViaadmin(String viaadmin) {
		this.viaadmin = viaadmin;
	}


	//bi-directional many-to-one association to Recetamedica
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="idrecetamedica", nullable=false, insertable=false, updatable=false)
	public Recetamedica getRecetamedica() {
		return this.recetamedica;
	}

	public void setRecetamedica(Recetamedica recetamedica) {
		this.recetamedica = recetamedica;
	}


	//bi-directional many-to-one association to Medicamento
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="idmedicamento", nullable=false, insertable=false, updatable=false)
	public Medicamento getMedicamento() {
		return this.medicamento;
	}

	public void setMedicamento(Medicamento medicamento) {
		this.medicamento = medicamento;
	}

}